import {createRouter, createWebHistory,RouteRecordRaw} from 'vue-router';

//引入路由 创建数组，用于保存一个组件对应路由地址
const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'HelloWorld',
        component: () => import('../components/HelloWorld.vue')
    },
    {
        path: '/Register',
        name: 'Register',
        component: () => import('../view/Users/Register.vue')
    },
    {
        path: '/Login',
        name: 'Login',
        component: () => import('../view/Users/Login.vue')
    },
    {
        path: '/UserRegister',
        name: 'UserRegister',
        component: () => import('../view/Users/UserRegister.vue')
    },
    {
        path: '/AddInvestInfo',
        name: 'AddInvestInfo',
        component: () => import('../view/Invests/AddInvestInfo.vue')
    },
    {
        path: '/ShowInvestInfo',
        name: 'ShowInvestInfo',
        component: () => import('../view/Invests/ShowInvestInfo.vue')
    },
    {
        path: '/EditInvestInfo',
        name: 'EditInvestInfo',
        component: () => import('../view/Invests/EditInvestInfo.vue')
    },
    {
        path: '/ShowUserInvestInfo',
        name: 'ShowUserInvestInfo',
        component: () => import('../view/Invests/ShowUserInvestInfo.vue')
    },
    {
        path: '/InvestInfoContent',
        name: 'InvestInfoContent',
        component: () => import('../view/Invests/InvestInfoContent.vue')
    },
    {
        path: '/AddUserInvestInfo',
        name: 'AddUserInvestInfo',
        component: () => import('../view/Invests/AddUserInvestInfo.vue')
    },
    {
        path: '/ShowUserInvestDetail',
        name: 'ShowUserInvestDetail',
        component: () => import('../view/Invests/ShowUserInvestDetail.vue')
    },
    {
        path: '/ShowUserDetail',
        name: 'ShowUserDetail',
        component: () => import('../view/Invests/ShowUserDetail.vue')
    },
    {
        path: '/AddFinanInfo',
        name: 'AddFinanInfo',
        component: () => import('../view/Finans/AddFinanInfo.vue')
    },
    {
        path: '/ShowFinanInfo',
        name: 'ShowFinanInfo',
        component: () => import('../view/Finans/ShowFinanInfo.vue')
    },
    {
        path: '/EditFinanInfo',
        name: 'EditFinanInfo',
        component: () => import('../view/Finans/EditFinanInfo.vue')
    },
    {
        path: '/AddBorow',
        name: 'AddBorow',
        component: () => import('../view/Borrows/AddBorow.vue')
    },
    {
        path: '/ShowBorow',
        name: 'ShowBorow',
        component: () => import('../view/Borrows/ShowBorow.vue')
    },
    {
        path: '/FinanInfoContent',
        name: 'FinanInfoContent',
        component: () => import('../view/Finans/FinanInfoContent.vue')
    },
    {
        path: '/ShowUserFinan',
        name: 'ShowUserFinan',
        component: () => import('../view/Finans/ShowUserFinan.vue')
    },
    {
        path: '/AddUserFinan',
        name: 'AddUserFinan',
        component: () => import('../view/Finans/AddUserFinan.vue')
    },
    {
        path: '/ShowAllUserFinan',
        name: 'ShowAllUserFinan',
        component: () => import('../view/Finans/ShowAllUserFinan.vue')
    },
    {
        path: '/LookUserFinan',
        name: 'LookUserFinan',
        component: () => import('../view/Finans/LookUserFinan.vue')
    },
    {
        path: '/BorrowInfoContent',
        name: 'BorrowInfoContent',
        component: () => import('../view/Borrows/BorrowInfoContent.vue')
    },
    {
        path: '/ShowUserBorrow',
        name: 'ShowUserBorrow',
        component: () => import('../view/Borrows/ShowUserBorrow.vue')
    },
    {
        path: '/AddUserBorrowMoney',
        name: 'AddUserBorrowMoney',
        component: () => import('../view/Borrows/AddUserBorrowMoney.vue')
    },
    {
        path: '/ShowAllBorrow',
        name: 'ShowAllBorrow',
        component: () => import('../view/Borrows/ShowAllBorrow.vue')
    },
    {
        path: '/LookUserBorrowInfo',
        name: 'LookUserBorrowInfo',
        component: () => import('../view/Borrows/LookUserBorrowInfo.vue')
    },
    {
        path: '/Index',
        name: 'Index',
        component: () => import('../view/Index.vue')
    },
    {
        path: '/UserInvestRedeem',
        name: 'UserInvestRedeem',
        component: () => import('../view/Invests/UserInvestRedeem.vue')
    },
    {
        path: '/AddUserRedeem',
        name: 'AddUserRedeem',
        component: () => import('../view/Invests/AddUserRedeem.vue')
    },
    {
        path: '/ShowAllRedeem',
        name: 'ShowAllRedeem',
        component: () => import('../view/Invests/ShowAllRedeem.vue')
    },
    {
        path: '/ShowAllRedeemDetail',
        name: 'ShowAllRedeemDetail',
        component: () => import('../view/Invests/ShowAllRedeemDetail.vue')
    },
    {
        path: '/UserFinanRedeemInfo',
        name: 'UserFinanRedeemInfo',
        component: () => import('../view/Finans/UserFinanRedeemInfo.vue')
    },
    {
        path: '/UserAddFianRedeem',
        name: 'UserAddFianRedeem',
        component: () => import('../view/Finans/UserAddFianRedeem.vue')
    },
    {
        path: '/ManageFinanRedeemInfo',
        name: 'ManageFinanRedeemInfo',
        component: () => import('../view/Finans/ManageFinanRedeemInfo.vue')
    },
    {
        path: '/ManageFinanRedeemDetail',
        name: 'ManageFinanRedeemDetail',
        component: () => import('../view/Finans/ManageFinanRedeemDetail.vue')
    },
    {
        path: '/UserBorrowRefund',
        name: 'UserBorrowRefund',
        component: () => import('../view/Borrows/UserBorrowRefund.vue')
    },
    {
        path: '/UserAddBorrowRefund',
        name: 'UserAddBorrowRefund',
        component: () => import('../view/Borrows/UserAddBorrowRefund.vue')
    },
    {
        path: '/ManageBorrowRefundInfo',
        name: 'ManageBorrowRefundInfo',
        component: () => import('../view/Borrows/ManageBorrowRefundInfo.vue')
    },
    {
        path: '/ManageBorrowRefundDetail',
        name: 'ManageBorrowRefundDetail',
        component: () => import('../view/Borrows/ManageBorrowRefundDetail.vue')
    },
    
    
]

//获取路由实例 createRouter() 创建路由函数 createWebHistory() 创建路由历史记录函数
const router = createRouter({
    history: createWebHistory(),
    routes
   
})
//导出路由实例
export default router;